<template >
    <div>
        <!-- 面包屑导航 -->
        <el-bread />
        <!-- 添加按钮 -->
        <el-button type="primary" plain class="add" size="small" @click="addlogin">添加</el-button>

        <!-- 列表 -->
        <v-list @edit="edit"></v-list>

        <!-- 弹框 -->
        <v-dialog ref="addInfo" :isShow="isShow" @cancel="cancel" :isAdd="isAdd"></v-dialog>
    </div>
</template>
<script lang="ts" setup>
import vList from './list.vue'
import vDialog from './dialog.vue'
import { ref } from 'vue'
let isShow = ref(false);
let isAdd = ref(false);
const addlogin = () => {
    isShow.value = true,
        isAdd.value = true
}
const cancel = (e: any) => {
    isShow.value = e
}
const edit = (e: number) => {
    isShow.value = true
    isAdd.value = false
    addInfo.value.lookup(e)
}
let addInfo = ref()
</script>
<style  scoped>
.add {
    margin-top: 20px;
}
</style>